<?php
class IndexController extends Controller
{
	public function logdbAction()
	{
		$logDb = new LogDb('log');
		
		$logDb->err('SQL错误');
		
		$logDb->info('普通消息');
		exit;
	}
	
	public function logstreamAction()
	{
		$userLog = new LogStream(APP_NAME . DS . 'data' . DS . 'user.log');
		
		$userLog->notice('*** 登录时用户名密码错误');
		$userLog->err('*** 登录时用户名密码错误3次');
		
		$adminLog = new LogStream(APP_NAME . DS . 'data' . DS . 'admin.log');
		
		$adminLog->warning('*** 操作有误');
		exit;
	}
} 
